package com.android.topview.watermelon.util

import android.view.View
import android.view.accessibility.AccessibilityEvent
import android.view.accessibility.AccessibilityNodeInfo

fun View.setTalkBackFocus() {
    post {
        performAccessibilityAction(
            AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS,
            null
        )
        sendAccessibilityEvent(
            AccessibilityEvent.TYPE_VIEW_SELECTED
        )
    }
}